public class Test {

}
//判定字符是否唯一
//https://leetcode.cn/problems/is-unique-lcci/submissions/603669526/
class Solution {
    public boolean isUnique(String astr) {
        if(astr.length() > 26){
            return false;
        }
        int hashInt = 0;
        for(char ch : astr.toCharArray()){
            int index = ch - 97;
            int flg = hashInt & (1<<index);
            if(flg != 0){
                return false;
            }else{
                hashInt = hashInt | (1<<index);
            }
        }
        return true;

    }
}
